package com.cloud.basic.Advance.Design.FactoryModel;

/**
 * @program: basic
 * @description:
 * @author: Cloud
 * @create: 2022/2/22 09:57:26
 */
public class Client {

    public static void main(String[] args) {
        // 调用Factory的静态方法生成所需的类
        ProductFactory.create("ProductA");
        ProductFactory.create("ProductB");

        Factory factory;
        factory = new FactoryA();
        factory.createProduct();

        factory = new FactoryB();
        factory.createProduct();

        factory = new FactoryC();
        factory.createProduct();

    }
}
